<table width="100%" cellspacing="0">
<tbody>
<tr>
<td valign="top" style="width:240px">
<table width="100%" cellpadding="0" cellspacing="0" style="border:1px solid #bbbbbb" class="filterForm">
	<tr>
		<td width="100%" bgcolor="#dddddd" style="padding-bottom:0px">
			<div style="margin-bottom:0px; padding-bottom:0px">
			<table border="0" cellpadding="0" cellspacing="0" width="100%" style="margin-bottom:0px">
			  <tbody>
				<tr>
				  <td height="20" valign="bottom" bgcolor="#dddddd" style="padding-bottom:0px">
				  <table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0" style="border:0px;">
					  <tbody>
						<tr>
						  <td width="1%"><b>Select:</b>&nbsp;</td>
						  <td align="center" nowrap="nowrap" width="10%" bgcolor="#AAAAAA"><font color="#ffffff"><b>View</b></font></td>
						   <?php if($this->id) {?>
						   <td width="10%" align="center">
							<a  style="padding: 4px 7px"><a href="<?=$this->baseUrl()?>/filter/edit/id/<?=$this->id?>"><b>Edit</b></a>
						  </td>
						  <?php }?>
						  <td width="10%" align="center">
							<a href="<?=$this->baseUrl()?>/filter/new"  style="padding: 4px 7px"><b>New</b></a>							  </td>
						  <td align="center" width="10%"><a href="<?=$this->baseUrl()?>/filter/manage"  style="padding: 4px 7px"><b>Manage</b></a></td>
						</tr>
					  </tbody>
				  </table></td>
				</tr>
			  </tbody>
			</table>
			</div>
			</td>
	</tr>
	<tr>
		<td>
			<?php if(isset($this->filterData)) {?>
				<table>
					<tbody>
						<tr>
						  <td>
								<b>Name</b><br>
								<?=$this->filterData['filtername']?>
						</td>
						</tr>
						<tr>
							<td>
								<b>Description</b><br>
								<?=$this->filterData['description']?>
							</td>
						</tr>
					</tbody>
				</table>
			<?php } else {?>
				<table border="0" cellpadding="3" cellspacing="0">
				  <tbody>
					<tr>
					  <td>You are currently using a new, unsaved search.</td>
					</tr>
					<tr>
					  <td><a href="<?=$this->baseUrl()?>/filter/save"><b>Save</b></a> it as filter</td>
					</tr>
				  </tbody>
				</table>
			<?php }?>
		</td>
	<tr>
		<td height="24" bgcolor="#F0F0F0"><strong>Summary</strong></td>
	</tr>
	<tr>
		<td>
			<table>	
				<tbody>
					<tr>
						<td>
							<div>Project:<a href="">project name</a></div>
							<div><b>Sorted By:</b>&nbsp;<?=$this->field?></div>
						</td>
					</tr>
				</tbody>
			</table>
		</td>
	<tr>
	<tr>
		<td height="24" bgcolor="#F0F0F0"><strong>Operations</strong></td>
	</tr>
	<tr>
		<td>
			<table>
				<tbody>
					<tr>
						<td>
							<a href="<?=$this->baseUrl()?>/filter/edit/id/<?=$this->id?>"><b>Edit</b></a> current filter details<br>
							<a href="<?=$this->baseUrl()?>/filter/save"><b>Save as</b></a> new filter
						</td>
					</tr>
				</tbody>
			</table>
		</td>
	<tr>
	<tr>
		<td height="24" align="center" bgcolor="#F0F0F0">&nbsp;</td>
	</tr>
</table>

</td>
<td valign="top">
<br>
<table width = "100%" align="center" border="0" cellpadding="0" cellspacing="0">
	<tbody>
		<tr>
			<td>
			<table width = "100%" align="center" border="0" cellpadding="0" cellspacing="0">
              <tbody>
                <tr>
                  <td><table width = "95%" align = "center" bgcolor="#bbbbbb" cellspacing="0" style="border:1px solid #bbbbbb">
                      <tr bgcolor="#f0f0f0">
                        <td style="border-bottom:0px"><h3 style="margin:3px 0 0 5px;height:20px">Issue Navigator</h3>
                          Displaying issues <?=$this->issuesData->getPages()->firstItemNumber?> to <?=$this->issuesData->getPages()->lastItemNumber?> of matching <?=$this->issuesData->getPages()->totalItemCount?> issues. </td>
                      </tr>
                      <tr>
                        <td bgcolor="#ffffff"><b>Current View:</b> <br/>
                          Browser <span style="font-size:10px">( Current Fields  | Printable  | Full Content  )</span> | XML  | RSS <span style="font-size:10px">( Issues  | Comments  )</span> | Word  | Excel <span style="font-size:10px">( All fields  | Current fields  )</span> </td>
                      </tr>
                    </table>
                      <br />

					  <table width="95%" cellpadding="0" cellspacing="0" align="center">
						<tfoot>
							<tr>
								<td colspan="11" align="center">
									<?=$this->paginationControl($this->issuesData, 'Sliding', 'pagination.phtml'); ?>	
								</td>
							</tr>
						</tfoot>
					   </table>
                      <table id="issuetable" width="95%" border="0" cellpadding="3" cellspacing="1" bgcolor="#bbbbbb" align="center">
                        <tbody>
                          <tr bgcolor="#f0f0f0">
                            <td <?php if($this->field == 'issueTypeName') { echo 'class="colHeaderSelected"'; } else { echo 'class="colHeaderLink"' ?> onMouseOver="this.className='colHeaderOver'" onMouseOut="this.className='colHeaderLink'"<?php }?>width="1%" nowrap="nowrap" onclick="window.document.location='<?=$this->url(array('controller'=>'filter','action'=>'view','field'=>0,'direction'=>$this->order))?>'"><b>T</b>&nbsp;<?php if($this->field == "issueTypeName") {?><img src="<?=$this->baseUrl()?>/images/<?=$this->orderImg?>" border="0" class="sortArrow"/><?php }?></td>
                            <td <?php if($this->field == 'pkey') { echo 'class="colHeaderSelected"'; } else { echo 'class="colHeaderLink"' ?> onMouseOver="this.className='colHeaderOver'" onMouseOut="this.className='colHeaderLink'"<?php }?>width="1%" nowrap="nowrap" onclick="window.document.location='<?=$this->url(array('controller'=>'filter','action'=>'view','field'=>1,'direction'=>$this->order))?>'"><b>Key</b>&nbsp;<?php if($this->field == "pkey") {?><img src="<?=$this->baseUrl()?>/images/<?=$this->orderImg?>" border="0" class="sortArrow"/><?php }?></td>
                            <td <?php if($this->field == 'summary') { echo 'class="colHeaderSelected"'; } else { echo 'class="colHeaderLink"' ?> onMouseOver="this.className='colHeaderOver'" onMouseOut="this.className='colHeaderLink'"<?php }?>width="1%" nowrap="nowrap" onclick="window.document.location='<?=$this->url(array('controller'=>'filter','action'=>'view','field'=>2,'direction'=>$this->order))?>'"><b>Summary</b>&nbsp;<?php if($this->field == "summary") {?><img src="<?=$this->baseUrl()?>/images/<?=$this->orderImg?>" border="0" class="sortArrow"/><?php }?></td>
                            <td <?php if($this->field == 'assignee') { echo 'class="colHeaderSelected"'; } else { echo 'class="colHeaderLink"' ?> onMouseOver="this.className='colHeaderOver'" onMouseOut="this.className='colHeaderLink'"<?php }?>width="1%" nowrap="nowrap" onclick="window.document.location='<?=$this->url(array('controller'=>'filter','action'=>'view','field'=>3,'direction'=>$this->order))?>'"><b>Assignee</b>&nbsp;<?php if($this->field == "assignee") {?><img src="<?=$this->baseUrl()?>/images/<?=$this->orderImg?>" border="0" class="sortArrow"/><?php }?></td>
                           <td <?php if($this->field == 'reporter') { echo 'class="colHeaderSelected"'; } else { echo 'class="colHeaderLink"' ?> onMouseOver="this.className='colHeaderOver'" onMouseOut="this.className='colHeaderLink'"<?php }?>width="1%" nowrap="nowrap" onclick="window.document.location='<?=$this->url(array('controller'=>'filter','action'=>'view','field'=>4,'direction'=>$this->order))?>'"><b>Reporter</b>&nbsp;<?php if($this->field == "reporter") {?><img src="<?=$this->baseUrl()?>/images/<?=$this->orderImg?>" border="0" class="sortArrow"/><?php }?></td>
                            <td <?php if($this->field == 'priorityName') { echo 'class="colHeaderSelected"'; } else { echo 'class="colHeaderLink"' ?> onMouseOver="this.className='colHeaderOver'" onMouseOut="this.className='colHeaderLink'"<?php }?>width="1%" nowrap="nowrap" onclick="window.document.location='<?=$this->url(array('controller'=>'filter','action'=>'view','field'=>5,'direction'=>$this->order))?>'"><b>Pr</b>&nbsp;<?php if($this->field == "priorityName") {?><img src="<?=$this->baseUrl()?>/images/<?=$this->orderImg?>" border="0" class="sortArrow"/><?php }?></td>
                            <td <?php if($this->field == 'issueStatusName') { echo 'class="colHeaderSelected"'; } else { echo 'class="colHeaderLink"' ?> onMouseOver="this.className='colHeaderOver'" onMouseOut="this.className='colHeaderLink'"<?php }?>width="1%" nowrap="nowrap" onclick="window.document.location='<?=$this->url(array('controller'=>'filter','action'=>'view','field'=>6,'direction'=>$this->order))?>'"><b>Status</b>&nbsp;<?php if($this->field == "issueStatusName") {?><img src="<?=$this->baseUrl()?>/images/<?=$this->orderImg?>" border="0" class="sortArrow"/><?php }?></td>
                            <td <?php if($this->field == 'resolutionName') { echo 'class="colHeaderSelected"'; } else { echo 'class="colHeaderLink"' ?> onMouseOver="this.className='colHeaderOver'" onMouseOut="this.className='colHeaderLink'"<?php }?>width="1%" nowrap="nowrap" onclick="window.document.location='<?=$this->url(array('controller'=>'filter','action'=>'view','field'=>7,'direction'=>$this->order))?>'"><b>Res</b>&nbsp;<?php if($this->field == "resolutionName") {?><img src="<?=$this->baseUrl()?>/images/<?=$this->orderImg?>" border="0" class="sortArrow"/><?php }?></td>
                            <td <?php if($this->field == 'created') { echo 'class="colHeaderSelected"'; } else { echo 'class="colHeaderLink"' ?> onMouseOver="this.className='colHeaderOver'" onMouseOut="this.className='colHeaderLink'"<?php }?>width="1%" nowrap="nowrap" onclick="window.document.location='<?=$this->url(array('controller'=>'filter','action'=>'view','field'=>8,'direction'=>$this->order))?>'"><b>Created</b>&nbsp;<?php if($this->field == "created") {?><img src="<?=$this->baseUrl()?>/images/<?=$this->orderImg?>" border="0" class="sortArrow"/><?php }?></td>
                            <td <?php if($this->field == 'updated') { echo 'class="colHeaderSelected"'; } else { echo 'class="colHeaderLink"' ?> onMouseOver="this.className='colHeaderOver'" onMouseOut="this.className='colHeaderLink'"<?php }?>width="1%" nowrap="nowrap" onclick="window.document.location='<?=$this->url(array('controller'=>'filter','action'=>'view','field'=>9,'direction'=>$this->order))?>'"><b>Updated</b>&nbsp;<?php if($this->field == "updated") {?><img src="<?=$this->baseUrl()?>/images/<?=$this->orderImg?>" border="0" class="sortArrow"/><?php }?></td>
                            <td <?php if($this->field == 'duedate') { echo 'class="colHeaderSelected"'; } else { echo 'class="colHeaderLink"' ?> onMouseOver="this.className='colHeaderOver'" onMouseOut="this.className='colHeaderLink'"<?php }?>width="1%" nowrap="nowrap" onclick="window.document.location='<?=$this->url(array('controller'=>'filter','action'=>'view','field'=>10,'direction'=>$this->order))?>'"><b>Due</b>&nbsp;<?php if($this->field == "duedate") {?><img src="<?=$this->baseUrl()?>/images/<?=$this->orderImg?>" border="0" class="sortArrow"/><?php }?></td>
                          </tr>
                          <?php 
						$i = 1;
						foreach ($this->issuesData as $issue) { ?>
                          <tr <?php if($i % 2) { echo "class='rowNormal'"; } else { echo "class='rowAlternate'";}?>>
                            <td class="nav"><img src= "<?=$this->baseUrl().$issue['issueTypeIcon']?>" title="<?=$issue['issueTypeName']?>"/> </td>
                            <td class="nav pkey"><?php echo $issue['pkey']?></td>
                            <td class="nav summary"><a href="<?=$this->baseUrl()?>/issue/view/id/<?=$issue['id']?>"><?php echo $issue['summary']?></a></td>
                            <td class="nav assignee"><?php echo $issue['assignee']?></td>
                            <td class="nav reporter"><?php echo $issue['reporter']?></td>
                            <td class="nav priority"><img src= "<?=$this->baseUrl().$issue['priorityIcon']?>" title="<?=$issue['priorityName']?>"/> </td>
                            <td class="nav status" align="center"><img src= "<?=$this->baseUrl().$issue['issueStatusIcon']?>" title="<?=$issue['issueStatusName']?>"/>&nbsp;
                                <?=$issue['issueStatusName']?>
                            </td>
                            <td class="nav resolution"><?php if ($issue['resolutionName']) {
							echo $issue['resolutionName'];
						} else {
							echo '<font style="color:red">Unresolved</font>';
						}
						?></td>
                            <td class="nav created"><?php 
								Zend_Date::setOptions(array('format_type' => 'php'));
								$created = new Zend_Date($issue['created']);
								print $created->toString("j/M/y");
							?>
                            </td>
                            <td class="nav updated"><?php
								$updated = new Zend_Date($issue['updated']);
								print $updated->toString("j/M/y");
							?>
                            </td>
                            <td class="nav duedate"><?php 
								$duedate = new Zend_Date($issue['duedate']);
								print $duedate->toString("j/M/y");	
							?>
                            </td>
                          </tr>
                          <?php 
							$i++;
						}?>
                        </tbody>
                    </table>
					<table width="100%" cellpadding="0" cellspacing="0">
						<tfoot>
							<tr>
								<td colspan="11" align="center">
									<?=$this->paginationControl($this->issuesData, 'Sliding', 'pagination.phtml'); ?>	
								</td>
							</tr>
						</tfoot>
					</table>					
					</td>
                </tbody>
            </table>
			  <br /></td>
	</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<script>
	function save()
	{
		document.getElementById('edit').action = "<?=$this->baseUrl()?>/filter/save";
		document.getElementById('edit').submit();
	}
	function editFilter()
	{
		location.href = "<?=$this->baseUrl()?>/filter/edit/id/<?=$this->id?>";
	}
</script>
